import React from 'react'
import {Route,Switch } from "react-router";
import Board from "./Board";
import Painting from './Painting'
import Qa from './Qa'
import User from './User'
import Admin from './Admin'
import Addpainting from './Addpainting';
import Addqa from './Addqa';
import Adduser from './Adduser';
import Addadmin from './Addadmin';
import Author from './Author';
import Addauthor from './Addauthor';
import Udpainting from './Udpainting';
import Udauthor from './Udauthor';
import Udqa from './Udqa';
import Udadmin from './Udadmin';

// 路由配置
const InnerContent = () => {
    return (
        <Switch>
            <Route exact path = '/'><Board/></Route>
            <Route path = '/index/board' ><Board /></Route>
            <Route path = '/index/painting' ><Painting/></Route>
            <Route path = '/index/qa' ><Qa/></Route>
            <Route path = '/index/author'><Author/></Route>
            <Route path = '/index/user' ><User/></Route>
            <Route path = '/index/admin' ><Admin/></Route>
            <Route path = '/index/addpainting'><Addpainting /></Route>
            <Route path = '/index/addqa'><Addqa /></Route>
            <Route path = '/index/adduser'><Adduser /></Route>
            <Route path = '/index/addadmin'><Addadmin /></Route>
            <Route path = '/index/addauthor'><Addauthor /></Route>
            <Route path = '/index/udpaint:id'><Udpainting/></Route>
            <Route path = '/index/udauthor:aId'><Udauthor/></Route>
            <Route path = '/index/udqa:qId'><Udqa/></Route>
            <Route path = '/index/udadmin:adminId'><Udadmin/></Route>
        </Switch>
    )
}

export default InnerContent
